﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;

namespace Engine
{
    public class Method
    {
        public String Name { get; set; }
        public String ReturnType { get; set; }
        public Boolean Static { get; set; }
        public NameValueCollection Paramaters { get; set; }
        //public Boolean Abstract { get; set; }
        //public Boolean Virtual { get; set; }

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            String objectiveCType = Engine.TypeConvertor.ToObjectiveC(this.ReturnType);

            String parameters = String.Empty;
            for (Int32 i = 0; i < this.Paramaters.Count; i++)
            {
                //(NSXMLParser *)parser foundCharacters:(NSString *)string 
                parameters += String.Format("{0}:({1}){2}", "type", "", ""); //TODO: complete
            }

            sb.AppendFormat("   ({2}){0} {1};", objectiveCType, this.Name, this.Static == true ? "+" : "-");
            sb.AppendLine();

            return sb.ToString();
        }
    }
}
